package com.bxy.dzsc.service.impl;

import com.bxy.dzsc.dao.UsersDao;
import com.bxy.dzsc.domain.Users;
import com.bxy.dzsc.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UsersServiceImpl implements UsersService {
    @Autowired
    private UsersDao usersDao;
    @Override
    public List<Users> findall() {
        return usersDao.findall();
    }

    @Override
    public Users findbynameandpwd(String username, String password) {
        return usersDao.findbynameandpwd(username, password);
    }

    @Override
    public Users findbyname(String username) {
        return usersDao.findbyname(username);
    }

    @Override
    public Users findbyid(Integer id) {
        return usersDao.findbyid(id);
    }

    @Override
    public void insertuser(Users users) {
        usersDao.insertuser(users);
    }

    @Override
    public void deleteuser(Integer id) {
        usersDao.deleteuser(id);
    }

    @Override
    public void updateuser(Users users) {
        usersDao.updateuser(users);
    }
}
